/*
 * zoekstage.fx
 *
 * Created on 20-nov-2009, 11:07:39
 */

package zoek;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.CustomNode;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;

/**
 * @author evert
 */

Stage {
    title: "Application title"
    scene: Scene {
        width: 700
        height: 700
        content: [
            Text {
                font : Font {
                    size : 16
                }
                x: 10
                y: 30
                content: "zoekresultaten"
            },
            MyCustomNode{}

        ]
    }
}
var image1=Image{url:"{__DIR__}play.jpg" width:75 height:150 preserveRatio: false}
var iv1 = ImageView { image: image1 }
class MyCustomNode extends CustomNode {
public var number:Integer=5;
	public override function create(): Node {
		return Group {
			content: [
                        for(i in [1..number]){
                            Group {
			content: [
                            Button {
                            text: "delete"
                            layoutX:450
                            layoutY:i*150
                            action: function() {
                        }
                        }
                            
                        Text {
                                font : Font {
                                        size: 24
                                }
                                x: 200, y: i*150
                                content: "Titel"
                        }
                        Button {
                            text: "edit"
                            layoutX:400
                            layoutY:i*150
                            action: function() {
                        }
                        }
                        ImageView {
                            layoutX:50

                            layoutY:i*150
                            image: Image {url: "{__DIR__}play.jpg"}
                        }
                        Text {
                                font : Font {
                                        size: 12
                                }
                                x: 120, y: i*170
                                content: "beschrijving blablablablablalblablablalbal"
                        }
                        Text {
                                font : Font {
                                        size: 12
                                }
                                x: 120, y: i*190
                                content: "tags"
                        }
]}
                        }
]
		};
	}
}
